function  SK7_Close();
% SHAKE SK7 Matlab Driver v0.00, (c) 2010 SAMH Engineering Services
%
% function  SK7_Close();
% Revert the SK7 to the factory configuration and then
% close the serial port connection.
global port

if strcmp( port.PinStatus.ClearToSend , 'on')
  % set the SK7 back to the factory default configuration
  SK7_Write( '0113' , 'BB' );
  pause(0.1);
else
  'Warning: SK7 configuration not set to default values on close'
end

fclose( port );

end
